package com.cloud.school.bus.teacherhelper.protocol.login;

import org.apache.http.Header;
import org.json.JSONObject;

import com.android.support.jhf.handlerui.HandlerToastUI;
import com.android.support.jhf.network.NetworkClient;
import com.cloud.school.bus.teacherhelper.protocol.baseresponse.BaseJsonHttpResponse;

public class GetTsigninResponse extends BaseJsonHttpResponse {

	@Override
	public void onSuccess(int statusCode, Header[] headers,
			String responseString) throws Throwable {
		
		
		if("1".equals(code)){
			//成功
			JSONObject mainJsonObject = new JSONObject(responseString);
			NetworkClient.getNetworkClient().setLoginToken(mainJsonObject.optString("sid", ""));
		}else if ("-1010".equals(code)) {
			//用户名或密码错误
		}else if ("-3".equals(code)) {
			//用户名或密码不能为空
		}else if ("-4".equals(code)) {
			//密码不能包含特殊字符
		}
	}

}
